package com.jwsoft.manager.common.enums;

public enum CardTypeEnum {
    idcard("01", "身份证"),
    passport("02", "护照"),
    compatriot("03", "台胞证"),
    passcheck("04", "台湾居民来往大陆通行证"),
    gapermit("05", "港澳居民来往内地通行证"),
    wgridcard("06", "外国人永久居留身份证");

    private String type;
    private String name;

    private CardTypeEnum(String type, String name) {
        this.type = type;
        this.name = name;
    }

    public String getType() {
        return this.type;
    }

    public String getName() {
        return this.name;
    }

    public static CardTypeEnum getByType(String type) {
        for (CardTypeEnum typeEnum : values()) {
            if (typeEnum.getType().equals(type)) {
                return typeEnum;
            }
        }
        return null;
    }
}
